﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ERP_RORZE_PRODUCT.Product.DAO;
using ERP_RORZE_DLL.Product.Base;

namespace ERP_RORZE_PRODUCT.Product.XLBM
{
    public partial class ctrlHangTonTaiXLBM : UserControl
    {
        ClsXLBM clsXLBMDAO = new ClsXLBM();
        DataTable dt;

        public ctrlHangTonTaiXLBM()
        {
            InitializeComponent();
        }

        void Reload(object sender, EventArgs e)
        {
            dt = clsXLBMDAO.GetHT();
            gridControl1.DataSource = dt;
            gridView1.BestFitColumns();
        }

        private void ctrlHangTonTaiXLBM_Load(object sender, EventArgs e)
        {
            Reload(sender, e);
        }

        private void btnRefresh_Click(object sender, EventArgs e)
        {
            Reload(sender, e);
        }

        private void btnReload_Click(object sender, EventArgs e)
        {
            Reload(sender, e);
        }

        private void btnExport_Click(object sender, EventArgs e)
        {
            clsConstantsFuction.ExportToExcel(gridView1, 1, true);
        }
    }
}
